package com.my.study.proxy;

import org.junit.Test;

/**
 * @author: yidujun
 * @create: 2021/07/12 10:46
 */
public class ProxyTest {

    @Test
    public void testProxy() {
        Class<IRealMethod> realMethodClass = IRealMethod.class;
        ProxyFactory<IRealMethod> proxyFactory = new ProxyFactory<>(realMethodClass);

        IRealMethod iRealMethod = proxyFactory.newInstance(new RealInvokeMethod());
        iRealMethod.invoke();
    }

}
